using UnityEngine;
using System;

public class BattlePlayerCommandComponent : MonoBehaviour
{
	public BattlePlayerCommandComponent ()
	{
	}

	public static bool AtkButton = false;
	public static bool RunButton = false;


	public void onAtkButtonTouch()
	{
		Transform t = transform.FindChild( "AtkSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();

		AtkButton = toggle.value;

		SABattleCreautreManager.instance.enableEnemiesTargets( AtkButton );
	}

	public void onSkillButtonTouch()
	{
		Transform t = transform.FindChild( "SkillSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();

	}

	public void onMagicButtonTouch()
	{
		Transform t = transform.FindChild( "MagicSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}

	public void onCatchButtonTouch()
	{
		Transform t = transform.FindChild( "CatchSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}

	public void onHelpButtonTouch()
	{
		Transform t = transform.FindChild( "HelpSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}



	public void onDefButtonTouch()
	{
		Transform t = transform.FindChild( "DefSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}

	public void onItemButtonTouch()
	{
		Transform t = transform.FindChild( "ItemSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}

	public void onPetButtonTouch()
	{
		Transform t = transform.FindChild( "PetSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();
	}

	public void onRunButtonTouch()
	{
		Transform t = transform.FindChild( "RunSprite" );
		UIToggle toggle = t.GetComponent< UIToggle >();

		RunButton = toggle.value;

		if ( RunButton ) 
		{
			SABattleCommandManager.instance.runCommand();
		}

	}

}
